ocaml: evtchn+xc bindings: use libxenctrl and libxenguest
authorIan Campbell <ian.campbell@citrix.com>
Thu, 6 Jan 2011 17:37:00 +0000 (17:37 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 6 Jan 2011 17:37:00 +0000 (17:37 +0000)
commit30cbc3ec4b4ecfd293f689c0f19126ecc5549c0d
treee7c3b28d66fe33e42b353f4d2b55bafb26b23752
parentdaec2beeaf53611dd145c4196eaee5cdd2e55a81
ocaml: evtchn+xc bindings: use libxenctrl and libxenguest

Now that tools/libxc is licensed under LGPL I don't think there is any need for
an LGPL reimplementation under tools/ocaml.

For the most part the conversion to the up-to-date libxc API (xc_lib.c
essentially implemented the same interface as an older libxc) was pretty
automatic. There are some functions which appear to no longer exist in libxc
which I therefore simply removed the bindings for and a small number of
interfaces which had changed.

Many of the functions bound by the stubs have no in-tree users (which I think
is fine for a language binding) so I have no way to confirm correctness other
than by eye. I was however able to confirm that oxenstored still worked and to
build a XCP toolstack which could successfully start a PV guest.

Uses the new XC_OPENFLAG_NON_REENTRANT option to avoid potential conflicts
between pthreads and the ocaml runtime.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Vincent Hanquez <Vincent.Hanquez@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
16 files changed:
tools/ocaml/Makefile.rules
tools/ocaml/libs/eventchn/eventchn.ml
tools/ocaml/libs/eventchn/eventchn.mli
tools/ocaml/libs/eventchn/eventchn_stubs.c
tools/ocaml/libs/xc/Makefile
tools/ocaml/libs/xc/xc.h [deleted file]
tools/ocaml/libs/xc/xc.ml
tools/ocaml/libs/xc/xc.mli
tools/ocaml/libs/xc/xc_cpufeature.h [deleted file]
tools/ocaml/libs/xc/xc_cpuid.h [deleted file]
tools/ocaml/libs/xc/xc_e820.h [deleted file]
tools/ocaml/libs/xc/xc_lib.c [deleted file]
tools/ocaml/libs/xc/xc_stubs.c
tools/ocaml/xenstored/Makefile
tools/ocaml/xenstored/event.ml
tools/ocaml/xenstored/xenstored.ml